ASP.NET MVC Controls > Getting Started > Client Side IntelliSense Support |
IntelliSense helps the developer to speed up the process of coding application by reducing typos and other common mistakes. While you are working with the client script in the typescript editor, IntelliSense helps you by displaying the objects, functions, and properties based on your current context. You can select an option from the pop-up list provided by the MVC IntelliSense to complete the code.
Check the Enable Client IntelliSense check box from the ComponentOne ASP.NET MVC Application Wizard to use IntelliSense for MVC controls in your Visual Studio application.
Once you check the Enable Client IntelliSense option, it automatically adds c1.mvc.basic.lib.d.ts to Scripts\Typings folder. Similarly, c1.mvc.finance.lib.d.ts, c1.mvc.flexsheet.lib.d.ts, c1.mvc.flexviewer.lib.d.ts, c1.mvc.multirow.lib.d.ts or c1.mvc.olap.lib.d.ts files are also automatically added to the folder, in case the user is working on Financial chart, FlexSheet, FlexViewer, MultiRow or OLAP, and have checked the Include C1 MVC Finance Library or Include C1 MVC FlexSheet Library or Include C1 MVC FlexViewer Library or Include C1 MVC MultiRow Library or Include C1 MVC Olap Library check box in the ComponentOne ASP.NET MVC Application Wizard.
Note: In case you are using standard VisualStudio templates to create an application, you can enable TS IntelliSense in your application by including and referencing the type definition files from C:\Program Files (x86)\ComponentOne\ASP.NET MVC Edition\TsTypings location. |
The Add TS File option helps you to use C1 MVC IntelliSense while working with TypeScript files. When you select the Add TS File option, it adds a .ts file to the Scripts folder that refers to the related .d.ts file.
C1Studio MVC Edition introduces JavaScript IntelliSense which enables the developers to quickly write their code for development. When you install C1 MVC Edition using the C1Studio installer, the JS IntelliSense file for MVC is automatically added to Visual Studio.
Once the JavaScript IntelliSense support is installed in your Visual Studio, it enables client side IntelliSense whenever you write script code.
The Cast method is a part of the JavaScript IntelliSense support for C1 MVC ASP.NET controls. In a TypeScript or JavaScript file, you can cast an object to other type, and then the members of the newly created type is available in the IntelliSense. Using the Cast method is helpful when you intend to use IntelliSense, while writing JavaScript code using the client-side API.
The example of using Cast method is as follows.
To enable JavaScript IntelliSense in VisualStudio 2017, you need to add c1.mvc.basic.lib.d.ts TypeScript file in your MVC application.